import request from '@/utils/request';
import { AxiosPromise } from 'axios';

//商户账户
export const merchantAccount = (query: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/merchantAccount/list',
    method: 'get',
    params: query
  });
};

//获取资金账户详情//payment/sydAccount/{id}
export const  merchantAccountDetail = (id: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/merchantAccount/'+id,
    method: 'get'
  });
};


//获取资金账户详情//payment/sydAccount/{id}
export const  addSydCashout = (data:any): AxiosPromise<[]> => {
  return request({
    url: '/payment/sydCashout',
    method: 'post',
    data:data
  });
};



//查询服务商资金账户列表
export const sydAccount = (query: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/sydAccount/list',
    method: 'get',
    params: query
  });
};


//获取资金账户详情//payment/sydAccount/{id}
export const sydAccountDetail = (id: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/sydAccount/'+id,
    method: 'get'
  });
};



//查询商户资金账户的充值信息
export const getRechargeAccount = (query: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/merchantAccount/getRechargeAccount',
    method: 'get',
    params: query
  });
};


//查询商户提现账户信息
export const getMerchantCashout = (id: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/merchantCashout/account/'+id,
    method: 'get'
  });
};


//查询商户资金账户的充值信息
export const addMerchantCashout = (data: any): AxiosPromise<[]> => {
  return request({
    url: '/payment/merchantCashout',
    method: 'post',
    data: data
  });
};

